import request from '@/utils/request'
import { baseUrl } from '@/config/env';

//获取素材列表
export const list = (params) => {
  return request({
    url: baseUrl+'/rest/material/list',
    method: 'get',
    params: {
      page:params.page,
      limit:params.limit,
      status:params.status
    }
  })
}

//素材收藏、取消收藏
export const collect = (fileId, status) => {
  return request({
    url: `${baseUrl}/rest/material/collect/${fileId}/${status}`,
    method: 'get',
  })
}

//素材删除
export const del = (fileId) => {
  return request({
    url: `${baseUrl}/rest/material/delete/${fileId}`,
    method: 'get',
  })
}

